package com.shreecon.lms.interfaces.persistance;

import com.shreecon.lms.interfaces.LMSException;

public interface IShreeConsDAO {

    /**
     * Save.
     * 
     * @param transientInstance
     *            the transient instance
     * @throws LMSException
     *             the lMS exception
     */
    public abstract void save(Object transientInstance) throws LMSException;

    /**
     * Save or update.
     * 
     * @param transientInstance
     *            the transient instance
     * @throws LMSException
     *             the lMS exception
     */
    public abstract void saveOrUpdate(Object transientInstance)
	    throws LMSException;

    /**
     * Delete.
     * 
     * @param persistentInstance
     *            the persistent instance
     * @throws LMSException
     *             the lMS exception
     */
    public abstract void delete(Object persistentInstance) throws LMSException;

    /**
     * Find by id.
     * 
     * @param id
     *            the id
     * @param hbmInstance
     *            the hbm instance
     * @return the object
     * @throws LMSException
     *             the lMS exception
     */
    @SuppressWarnings("unchecked")
    public abstract Object findById(Long id, Class hbmInstance)
	    throws LMSException;

}